<template>
    <div class="jobcommon EditResumeInfo">
        <div class="smalbox">
            <div class="backnavjob">
                <h1 @click="closejibenxinxi('close')">
                    <img
                        data-v-61dd7a3d=""
                        src="../../assets//newimg/index/icon_right_h.png"
                        alt=""
                    />
                </h1>
                <h2>
                    <span>简历-自我介绍</span>
                </h2>
                <h3></h3>
            </div>

            <div class="per-introduce">
                <textarea
                    placeholder="请输入简历描述"
                    name="specialty"
                    v-model="resume_info.specialty"
                ></textarea>
            </div>
            <div class="per-introduce-tip">
                <div class="text-num">最多可输入2000字</div>
                <div class="J_empty text-clear" @click="clearTextarea">
                    清空
                </div>
                <div class="clear"></div>
            </div>

            <div class="j_newbutton">
                <div class="j_newbtn" @click="closejibenxinxi()">保存</div>
            </div>
            <div class="zhanwei"></div>
        </div>
    </div>
</template>

<script>
import { axiosPost } from '../../axios';
import { Toast } from 'vant';
export default {
    name: '',
    props: ['resume_info'],
    data() {
        return {};
    },
    computed: {},
    mounted() {},
    methods: {
        closejibenxinxi(type) {
            if (type) {
                this.$emit('closeProps', { type: 2, key: false });
                return;
            }
            // this.$emit('closeProps', { type: 2, key: false });
            axiosPost(
                '/apis/resume/edit_description',
                {
                    specialty: this.resume_info.specialty,
                    pid: this.resume_info.id,
                },
                (res) => {
                    Toast({
                        message: res.msg,
                        duration: 2000,
                    });
                    if (res.status != 1) {
                        return;
                    }
                    this.$emit('closeProps', { type: 2, key: true });
                }
            );
        },
        clearTextarea() {
            this.resume_info.specialty = '';
        },
    },
};
</script>
<style lang="css" src="../../assets/css/jobperson.css"></style>
<style lang="less" scope></style>
